﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NFit.Core.Interfaces;

namespace NFit.Core
{
    /// <summary>
    /// Base class for fixture implementation
    /// </summary>
    public abstract class AbstractFixture
    {
        /// <summary>
        /// Context of the execution
        /// </summary>
        public IExecutionContext Context { get; set; }

        /// <summary>
        /// Current specification
        /// </summary>
        public SpecificationDefinition Specification { get; set; }

        /// <summary>
        /// Fixture definition
        /// </summary>
        public FixtureDefinition FixtureDefinition { get; set; }

        /// <summary>
        /// Current row
        /// </summary>
        public FixtureRow Row { get; set; }
        
        /// <summary>
        /// Fill arguments and definition if necessary
        /// </summary>
        /// <returns></returns>
        public abstract void Resolve();

        /// <summary>
        /// Execute the fixture for the provided row
        /// </summary>
        public abstract bool Run();
    }
}
